﻿using Core.AutoFacService.Attributes.InterceptorAttributes.BaseAttributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.AutoFacService.Attributes.InterceptorAttributes
{
    /// <summary>
    /// 标记此特性代表方法执行之前将会删除指定key的缓存内容
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    public class DeleteCacheAttribute : BaseCacheAttribute
    {
        public DeleteCacheAttribute(string constKey, string dynamicParamKeys = null)
        {
            ConstKey = constKey;
            if (dynamicParamKeys != null)
            {
                DynamicParamKeys = dynamicParamKeys.Split(',').ToList();
            }

        }
    }
}
